﻿using UnityEngine;
using System.Collections;

public class ColliderSendMessage : Actor
{
	public GameObject m_Target;

	public delegate void Callback(Collider2D i_Collide);
	public Callback m_OnTriggerEnter2D;

	private void OnTriggerEnter2D(Collider2D i_Collider)
	{
		if(m_OnTriggerEnter2D != null) m_OnTriggerEnter2D(i_Collider);
	}

	public void Message(string i_Message, object i_Value)
	{
		m_Target.SendMessage(i_Message, i_Value, SendMessageOptions.DontRequireReceiver);
	}
}
